package com.mzy.olddate.demo.customexception;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author mzy
 * @Date 2021/7/25 21:55
 * @Version 1.0
 */
public class Test {
    static void test(int a) throws MyException {

        System.out.println("传递的参数为："+ a);
        if (a>10){
            throw new MyException(a);
        }

        System.out.println("正常 不大于10");
    }

    public static void main(String[] args) {
        try {
            test(11);
        } catch (MyException e) {
            System.out.println(e);
        }
    }
}
